import 'package:flutter/material.dart';


void main(List<String> args) {
  runApp(MyApp()) ;
}


//自定义组件

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar:AppBar(
          title: Text("flutter demo"),
        ),
        body:HomeContent(),
      ),
      theme: ThemeData(
        brightness: Brightness.light,
        primarySwatch: Colors.yellow
      ),
    );


  }
}


class HomeContent extends StatelessWidget {
  const HomeContent({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Text(
        "你好flutter 222333",
        textDirection: TextDirection.ltr,
        style: TextStyle(
          //color:Color.fromRGBO(244,233,121,0.5),
          color: Colors.yellow,
          fontSize: 40.0,
        ),
      ) ,
    );
  }
}




